//
//  UserResumeViewTableViewCell.m
//  XinKaiFa55like
//
//  Created by junseek on 2017/8/8.
//  Copyright © 2017年 55like lj. All rights reserved.
//

#import "UserResumeViewTableViewCell.h"

@interface UserResumeViewTableViewCell (){    //
    
    NSIndexPath *tempIndexPath;
    NSDictionary *tempDic;
    
    UILabel *lblName;
    UILabel *lblTitle;
    UILabel *lblContent;
    UIImageView *imageIcon;
    UILabel *lblDate;
    
}

@end
@implementation UserResumeViewTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
       
        imageIcon=[RHMethods imageviewWithFrame:CGRectMake(10, 10, 40, 40) defaultimage:@"touxiang" contentMode:UIViewContentModeScaleAspectFit];
        [self addSubview:imageIcon];
        [[Utility Share] viewLayerRound:imageIcon borderWidth:0.1 borderColor:[UIColor clearColor]];
        
        lblName=[RHMethods labelWithFrame:CGRectMake(60, 10,kScreenWidth-70, 20) font:fontTitle color:rgbTitleColor text:@""];
        [self addSubview:lblName];
        
        
        lblTitle=[RHMethods labelWithFrame:CGRectMake(X(lblName), YH(lblName),W(lblName), 20) font:fontTxtContent color:rgbTitleDeepGray text:@""];
        [self addSubview:lblTitle];
        
        lblContent=[RHMethods labelWithFrame:CGRectMake(X(lblTitle), YH(lblTitle), W(lblName), 20) font:fontTxtContent color:rgbTxtDeepGray text:@""];
        [self addSubview:lblContent];
        
        lblDate=[RHMethods labelWithFrame:CGRectMake(X(lblTitle), YH(lblContent), W(lblName), 20) font:fontSmallTitle color:rgbTxtGray text:@""];
        [self addSubview:lblDate];
        
              UIView *  viewLine=[RHMethods lineViewWithFrame:CGRectMake(0, 100, kScreenWidth, 5)];
        viewLine.backgroundColor=rgbGray;
                [self addSubview:viewLine];
        //        viewLine.hidden=YES;
        [self setSelectionStyle:UITableViewCellSelectionStyleNone];
    }
    return self;
}

//内容更新
-(void)setValueForDictionary:(NSDictionary *)dic indexPath:(NSIndexPath *)indexPath type:(NSString *)strType{
    tempIndexPath=indexPath;
    tempDic=dic;
    [imageIcon imageWithURL:[dic valueForJSONStrKey:@"path"] useProgress:NO useActivity:NO];
    
    NSString *strTitle=[dic valueForJSONStrKey:@"name"];//[NSString stringWithFormat:@"%@",[dic valueForJSONStrKey:@"stitle"]];
    lblName.text=strTitle;
    
    lblTitle.text=[dic valueForJSONStrKey:@"job"];
    lblContent.text=[NSString stringWithFormat:@"%@  工号:%@" ,[dic valueForJSONStrKey:@"department"],[dic valueForJSONStrKey:@"jobnum"]];
    
    
    lblDate.text=[dic valueForJSONStrKey:@"ctime"];//[[Utility Share] timeToTimestamp:[dic
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
